Defining a variable
name = Alex
echo name .
echo The above name is printed using PHP variables name
Concatenating two variables
role = a student
echo name . is . role .
echo The above statement was printed by concatenating two variables
Comparing two numbers and printing the result
num1 = 7
num2 = 15
if (num1 < num2)
echo num1 . is smaller than . num2 .
else
echo num1 . is not smaller than . num2 .